var app = angular.module('app',['ionic'])
app.run(function($rootScope,$ionicScrollDelegate){
	$rootScope.scrollTop = function() {
    $ionicScrollDelegate.scrollTop();
 };
})
app.config(function($stateProvider,$urlRouterProvider){
	$urlRouterProvider.otherwise('homes')
	$stateProvider.state('homes',{
		url:'/homes',
		templateUrl:'views/homes/home.html',
		controller:'home'
	}).state('tests',{
		url:'/tests',
		templateUrl:'views/tests/test.html',
		controller:'tests'
	}).state('informations',{
		url:'/informations',
		templateUrl:'views/informations/information.html',
		controller:'information'
	}).state('muyings',{
		url:'/muyings/:id',
		templateUrl:'views/muyings/muying.html',
		controller:'muying'
	}).state('details',{
		url:"/details/:id",
		templateUrl:'views/details/detail.html',
		controller:'detail'
	}).state('cepings',{
		url:'/cepings/:id/:name',
		templateUrl:'views/cepings/ceping.html',
		controller:'ceping'
	}).state('news',{
		url:'/news',
		templateUrl:'views/news/new.html',
		controller:'new'
	}).state('users',{
		url:"/users",
		templateUrl:'views/users/user.html',
		controller:'user'
	}).state('brands',{
		url:'/brands',
		templateUrl:'views/brands/brand.html',
		controller:'brand'
	}).state('infos',{
		url:'/infos/:image/:id/:length',
		templateUrl:'views/infos/info.html',
		controller:'info'
	}).state('reads',{
		url:"/reads/:id/:title",
		templateUrl:'views/reads/read.html',
		controller:'read'
	}).state('serchs',{
		url:'/serchs/:id',
		templateUrl:'views/serchs/serch.html',
		controller:'serch'
	})
})
